package icu.thatyear.main.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 单品SKU表
 * </p>
 *
 * @author Cjy
 * @since 2024-12-06
 */
@Getter
@Setter
@TableName("tz_sku")
@Schema(name = "TzSku", description = "单品SKU表")
public class TzSku implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "单品ID")
    @TableId(value = "sku_id", type = IdType.AUTO)
    private Long skuId;

    @Schema(description = "商品ID")
    @TableField("prod_id")
    private Long prodId;

    @Schema(description = "销售属性组合字符串 格式是p1:v1;p2:v2")
    @TableField("properties")
    private String properties;

    @Schema(description = "原价")
    @TableField("ori_price")
    private BigDecimal oriPrice;

    @Schema(description = "价格")
    @TableField("price")
    private BigDecimal price;

    @Schema(description = "商品在付款减库存的状态下，该sku上未付款的订单数量")
    @TableField("stocks")
    private Integer stocks;

    @Schema(description = "实际库存")
    @TableField("actual_stocks")
    private Integer actualStocks;

    @Schema(description = "修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @Schema(description = "记录时间")
    @TableField("rec_time")
    private LocalDateTime recTime;

    @Schema(description = "商家编码")
    @TableField("party_code")
    private String partyCode;

    @Schema(description = "商品条形码")
    @TableField("model_id")
    private String modelId;

    @Schema(description = "sku图片")
    @TableField("pic")
    private String pic;

    @Schema(description = "sku名称")
    @TableField("sku_name")
    private String skuName;

    @Schema(description = "商品名称")
    @TableField("prod_name")
    private String prodName;

    @Schema(description = "版本号")
    @TableField("version")
    private Integer version;

    @Schema(description = "商品重量")
    @TableField("weight")
    private Double weight;

    @Schema(description = "商品体积")
    @TableField("volume")
    private Double volume;

    @Schema(description = "0 禁用 1 启用")
    @TableField("status")
    private Byte status;

    @Schema(description = "0 正常 1 已被删除")
    @TableField("is_delete")
    private Byte isDelete;
}
